<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_base_device".
 *
 * @property string $id
 * @property string $memo 设备简介
 * @property string $user_id 用户ID
 * @property string $uuid 通用标识ID
 * @property string $push_token 推送Token
 * @property string $machine_id 设备IME
 * @property string $verify_token 登陆Token
 * @property string $token_expire Token有效期
 * @property string $operation_system 操作系统类型
 * @property string $client_version 客户端 版本号
 * @property string $type 扩展类型
 * @property string $type 状态
 * @property string $create_time 创建时间
 * @property string $update_time 更新时间
 * @property int $op_id 操作人ID
 * @property string $network 联网方式
 * @property string $imsi #SIM
 * @property string $app_channel 下载渠道
 * @property string $mobile 手机号码
 * @property string $location 地区
 * @property string $operator 运营商
 * @property string $idfa IDFA for iOS device
 * @property string $del_flag 删除标识
 */
class TBaseDevice extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_base_device';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['type', 'op_id', 'del_flag'], 'integer'],
            [['token_expire', 'create_time', 'update_time'], 'safe'],
            [['operation_system', 'client_version', 'status'], 'string', 'max' => 64],
            [['verify_token'], 'string', 'max' => 1024],
            [['id', 'user_id'], 'string', 'max' => 36],
            [['memo', 'uuid', 'push_token', 'machine_id'], 'string', 'max' => 128],
            [['network', 'imsi', 'app_channel', 'mobile', 'location', 'operator', 'idfa'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'memo' => Yii::t('app', '设备简介'),
            'user_id' => Yii::t('app', '用户ID'),
            'uuid' => Yii::t('app', '通用标示ID'),
            'push_token' => Yii::t('app', '推送Token'),
            'machine_id' => Yii::t('app', '设备IME'),
            'verify_token' => Yii::t('app', '登陆Token'),
            'token_expire' => Yii::t('app', 'Token有效期'),
            'operation_system' => Yii::t('app', '操作系统类型'),
            'client_version' => Yii::t('app', '客户端 版本号'),
            'type' => Yii::t('app', '扩展类型'),
            'status' => Yii::t('app', '状态'),
            'create_time' => Yii::t('app', '创建时间'),
            'update_time' => Yii::t('app', '更新时间'),
            'op_id' => Yii::t('app', '操作人ID'),
            'network' => Yii::t('app', '联网方式'),
            'app_channel' => Yii::t('app', '下载渠道'),
            'mobile' => Yii::t('app', '手机号码'),
            'location' => Yii::t('app', '地区'),
            'operator' => Yii::t('app', '运营商'),
            'idfa' => Yii::t('app', 'IDFA for iOS device'),
            'del_flag' => Yii::t('app', '删除标志'),
        ];
    }
}
